<?php defined('_JEXEC') or die('Restricted access'); ?>
<div class="article">
<?php if ($this->user->authorize('com_content', 'edit', 'content', 'all')) : ?>
	<div class="contentpaneopen_edit<?php echo $this->params->get( 'pageclass_sfx' ); ?>" style="float: left;">
		<?php echo JHTML::_('icon.edit', $this->item, $this->params, $this->access); ?>
	</div>
<?php endif; ?>

<?php if ($this->params->get('show_title') || $this->params->get('show_pdf_icon') || $this->params->get('show_print_icon') || $this->params->get('show_email_icon')) : ?>
<div class="contentpaneopen<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
<div>
	<?php if ($this->params->get('show_title')) : ?>
	<h2 class="contentheading<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
		<?php if ($this->params->get('link_titles') && $this->item->readmore_link != '') : ?>
		<span class="readon"><a href="<?php echo $this->item->readmore_link; ?>" class="contentpagetitle<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
			<?php echo $this->item->title; ?>
		</a></span>
		<?php else : ?>
			<?php echo $this->item->title; ?>
		<?php endif; ?>
	</h2>
	<?php endif; ?>
<?php if ($this->params->get('show_pdf_icon') || $this->params->get('show_print_icon') || $this->params->get('show_email_icon') || $this->params->get('show_author') || $this->params->get('show_create_date')) : ?>
    <div class="cpanel">
	<?php if ($this->params->get('show_pdf_icon')) : ?>
	<div class="buttonheadingicon">
	<?php echo JHTML::_('icon.pdf', $this->item, $this->params, $this->access); ?>
	</div>
	<?php endif; ?>

	<?php if ( $this->params->get( 'show_print_icon' )) : ?>
	<div class="buttonheadingicon">
	<?php echo JHTML::_('icon.print_popup', $this->item, $this->params, $this->access); ?>
	</div>
	<?php endif; ?>

	<?php if ($this->params->get('show_email_icon')) : ?>
	<div class="buttonheadingicon">
	<?php echo JHTML::_('icon.email', $this->item, $this->params, $this->access); ?>
	</div>
	<?php endif; ?>

    <?php if (($this->params->get('show_author')) && ($this->item->author != "")) : ?>
	<div class="createdby">
			<?php JText::printf( 'Written by', ($this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author) ); ?>
		&nbsp;&nbsp;
	</div>
	<?php endif; ?>

	<?php if ($this->params->get('show_create_date')) : ?>
	<div class="createdate">
		<?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC1')); ?>
	</div>
    <?php endif; ?>
   
    <?php if ($this->params->get('show_url') && $this->item->urls) : ?>
	<div>
		<a href="http://<?php echo $this->item->urls ; ?>" target="_blank">
			<?php echo $this->item->urls; ?></a>
	</div>
	<?php endif; ?>
 <div class="clr"></div>
    </div>

    <?php endif; ?>
    
</div>
</div>
<?php endif; ?>
<?php  if (!$this->params->get('show_intro')) :
	echo $this->item->event->afterDisplayTitle;
endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<div class="contentpaneopen<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
<?php if (($this->params->get('show_section') && $this->item->sectionid) || ($this->params->get('show_category') && $this->item->catid)) : ?>
<div>
	<div>
		<?php if ($this->params->get('show_section') && $this->item->sectionid && isset($this->item->section)) : ?>
		<h2>
			<?php if ($this->params->get('link_section')) : ?>
				<?php echo '<a href="'.ContentHelperRoute::getSectionRoute($this->item).'">'; ?>
			<?php endif; ?>
			<?php echo $this->item->section; ?>
			<?php if ($this->params->get('link_section')) : ?>
				<?php echo '</a>'; ?>
			<?php endif; ?>
				<?php if ($this->params->get('show_category')) : ?>
				<?php echo ' - '; ?>
			<?php endif; ?>
		</h2>
		<?php endif; ?>
		<?php if ($this->params->get('show_category') && $this->item->catid) : ?>
		<h2>
			<?php if ($this->params->get('link_category')) : ?>
				<?php echo '<a href="'.ContentHelperRoute::getCategoryRoute($this->item).'">'; ?>
			<?php endif; ?>
			<?php echo $this->item->category; ?>
			<?php if ($this->params->get('link_section')) : ?>
				<?php echo '</a>'; ?>
			<?php endif; ?>
		</h2>
		<?php endif; ?>
	</div>
</div>
<?php endif; ?>
<div>
<div>
<?php if (isset ($this->item->toc)) : ?>
	<?php echo $this->item->toc; ?>
<?php endif; ?>
<?php echo $this->item->text; ?>
</div>
</div>

<?php if (!empty($this->item->modified) && $this->params->get('show_modify_date')) : ?>
<div>
	<div class="modifydate">
		<?php echo JText::_( 'Last Updated' ); ?> ( <?php echo JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2')); ?> )
	</div>
</div>
<?php endif; ?>

<?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
<div>
	<a href="<?php echo $this->item->readmore_link; ?>" class="readon<?php echo $this->item->params->get( 'pageclass_sfx' ); ?>">
		<?php if ($this->item->readmore_register) : ?>
			<?php echo JText::_('Register to read more...'); ?>
		<?php else : ?>
			<?php echo JText::_('Read more...'); ?>
		<?php endif; ?>
	</a>
</div>
<?php endif; ?>

</div>
<span class="article_separator">&nbsp;</span>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>